package com.linkhub.oms.dao.mpservice;

import com.linkhub.oms.common.enums.mp.OrderProductTypeEnum;
import com.linkhub.oms.entity.OrderProductEntity;
import com.baomidou.mybatisplus.extension.service.IService;
import com.linkhub.oms.entity.resulttype.OrderLocalProductResultEntity;

import java.util.Collection;
import java.util.List;

/**
 * <p>
 * 订单商品信息表 服务类
 * </p>
 *
 * @author echo
 * @since 2024-03-28
 */
public interface IOrderProductService extends IService<OrderProductEntity> {

    List<Long> listMatchShopSkuIds(String sysShopId, Collection<Long> shopSkuIds);

    List<String> listLocalOrderLineItemOrderIds(Collection<String> sysOrderIds);

    void deleteBySysOrderIds(Collection<String> sysOrderIds, OrderProductTypeEnum productType);

    void deleteBySysOrderIds(Collection<String> sysOrderIds);

    List<String> listUnMatchSysOrderIds(Collection<String> sysOrderIds);

    List<OrderProductEntity> listBySysOrderIds(Collection<String> sysOrderIds, OrderProductTypeEnum productType);

    List<OrderProductEntity> listBySysOrderIds(Collection<String> sysOrderIds);

    List<OrderProductEntity> listBySysOrderId( String sysOrderId );

    List<OrderLocalProductResultEntity> listOrderLocalProducts( Collection<String> sysOrderIds);

    boolean existOrderLocalProduct(String sysOrderId);

    void updateOrderProduct(String orderId, String localSkuId, String shopProductId, OrderProductEntity orderProduct);

    long countOrderLocalProduct(String sysOrderId);

    void deleteOrderLocalProduct(String orderId, String skuId, String shopProductId);

    List<OrderProductEntity> listLocalSkuIds(Collection<String> sysOrderIds);


    List<OrderProductEntity> deepMappingOrderProduct( List<OrderProductEntity> orderProductEntities );
}
